<template>
  <div>
    <!-- 轮播图开始 -->
    <div>
      <el-carousel :interval="4000" type="card" height="200px">
        <el-carousel-item v-for="item in 6" :key="item">
          <h3 class="medium">{{ item }}</h3>
        </el-carousel-item>
      </el-carousel>
    </div>
    <!-- 轮播图结束 -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      lunbotuData: {},
    };
  },
  async created() {
    //向后端发起请求获取轮播图数据;
    const data = await this.$http("/login/cellphone", {
      phone: "17623034175",
      password: "sunzhengkai1998",
    });
    console.log(data);
  },
  //   mounted: {},
};
</script>
<style>
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>